package com.qasystem.qa.core.scurity;

import com.qasystem.qa.core.constants.Constants;
import com.qasystem.qa.system.entity.User;
import lombok.Data;

import java.io.Serializable;

@Data
public class ScurityUser implements Serializable {
    private static final long serialVersionUID = 1L;
    private  String userId;
    private String userName;
    private  String token;
    private Integer roleId;
    private long MAX_TIME;
    public ScurityUser (User user) {
        this.userId = user.getUserid();
        this.userName = user.getUsername();
        this.roleId = user.getRoleid();
        this.MAX_TIME = Constants.MAX_TIME;
    }
    public ScurityUser (User user, String token) {
        this (user);
        this.token = token;
    }

    public static ScurityUser getOneInstance (String userName, String password) {
        return null;
    }

}
